
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:furaha_mkopo/cache/fm_cache.dart';
import 'package:furaha_mkopo/commonUI/fm_progress_hud.dart';
import 'package:furaha_mkopo/launch/fm_launch_page.dart';
import 'package:furaha_mkopo/manager/fm_device_manager.dart';
import 'package:furaha_mkopo/net/fm_net_param_manager.dart';
import 'package:get/get_navigation/src/root/get_material_app.dart';

class FMApp {

  static void run() async {

    WidgetsFlutterBinding.ensureInitialized();

    await FMCache.preInit();
    await FMNetParamManager().init();

    runApp(const MyApp());
  }
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const FMProgressHud(
      isGlobalHud: true,
      child: GetMaterialApp(
        debugShowCheckedModeBanner: false,
        supportedLocales: [
          Locale('en', 'US')
        ],
        title: "Furaha Mkopo",
        home: FMLaunchPage(),
      ),
    );
  }
}
